<template>
	<view>
		<view style="background-color: #FE963F; position: absolute; width: 100%; height: 400rpx; border-radius: 0rpx 0rpx 30rpx 30rpx;">
			<image src="/static/work/work.png" style="width: 250rpx; height: 270rpx; position: fixed; right: 50rpx; top: 60rpx;"></image>
			<text style="color: #fff; font-size: 40rpx; position: fixed; top: 140rpx; left: 50rpx; font-weight: bold;">
				欢迎来到工作台
			</text>
		</view>
		<!-- 菜单 -->
		<view style="position:absolute; width: 100%; top: 320rpx;">
			<navigator url="/pages/clerk/recomOrder">
				<view style="width: 50%; float: left;">
					<view style=" height: 130rpx; box-shadow: 3px 3px 10px rgba(30, 40, 65, 0.08); background-color:#fff; margin: 20rpx; padding: 20rpx 10rpx; font-size: 32rpx; border-radius: 20rpx;">
						<view style="font-weight: bold; padding: 30rpx;">我的推荐</view>
						<image src="/static/work/order.png" style="width: 65rpx; height: 65rpx; float: right; top: -30rpx; position: relative;"></image>
					</view>
				</view>
			</navigator>
			<navigator url="/pages/clerk/sourceOrder">
				<view style="width: 50%; float: left;">
					<view style=" height: 130rpx; box-shadow: 3px 3px 10px rgba(30, 40, 65, 0.08); background-color:#fff; margin: 20rpx; padding: 20rpx 10rpx; font-size: 32rpx; border-radius: 20rpx;">
						<view style="font-weight: bold; padding: 30rpx;">我的溯源</view>
						<image src="/static/work/order.png" style="width: 65rpx; height: 65rpx; float: right; top: -30rpx; position: relative;"></image>
					</view>
				</view>
			</navigator>
			<navigator url="/pages/clerk/confirmPrizeList">
				<view style="width: 50%; float: left;">
					<view style=" height: 130rpx; box-shadow: 3px 3px 10px rgba(30, 40, 65, 0.08); background-color:#fff; margin: 20rpx; padding: 20rpx 10rpx; font-size: 32rpx; border-radius: 20rpx;">
						<view style="font-weight: bold; padding: 30rpx;">核销记录</view>
						<image src="/static/work/order.png" style="width: 65rpx; height: 65rpx; float: right; top: -30rpx; position: relative;"></image>
					</view>
				</view>
			</navigator>
		</view>
		
	</view>
</template>

<script>
	import * as userApi from '@/api/user'
	import storage from '@/utils/storage'
	export default {
		components: {
		},
		data() {
			return {

			}
		},
		onLoad() {
			userApi.dashboard({
				activityId: storage.get('activityId')
			}).then(res => {
				if (res.data.role != 2) {
					uni.redirectTo({
						url: '/pages/user/center/index?activityId=' + storage.get('activityId')
					})
				}
			});
		},
		methods: {

		},
		mounted() {
			
		}
	}
</script>